// <copyright file="SqlGeneratorOptions.cs" company="DotNetSide">
// Copyright (c) 2008 All Right Reserved
// </copyright>
// <author>fabio.cozzolino</author>
// <date>01/07/2008 15.21.27</date>

namespace DotNetSide.SqlScriptGenerator
{
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Configuration;
    using System.ComponentModel;

    public enum TypeOfQuery
    {
        InsertOnly,
        InsertOnlyNewRecords,
        InsertOrUpdate,
        UpdateOnly
    }

    public class SqlGeneratorOptions
    {
        private bool generateDeleteStatement;
        private bool useTransaction;
        private TypeOfQuery queryType;
        private string[] tables;

        [DisplayName("Delete ALL records first")]
        public bool GenerateDeleteStatement
        {
            get { return this.generateDeleteStatement; }
            set { this.generateDeleteStatement = value; }
        }

        [DisplayName("Use Transaction")]
        public bool UseTransaction
        {
            get { return this.useTransaction; }
            set { this.useTransaction = value; }
        }

        [DisplayName("Type of query")]
        public TypeOfQuery QueryType
        {
            get { return this.queryType; }
            set { this.queryType = value; }
        }

        [Browsable(false)]
        public string[] Tables
        {
            get { return tables; }
            set { tables = value; }
        }

        public SqlGeneratorOptions()
        {
            this.generateDeleteStatement = true;
            this.useTransaction = true;
            this.queryType = TypeOfQuery.InsertOnly;
        }
    }
}
